{% extends "account/base_entrance.html" %}
{% load i18n %}
{% load allauth account %}
{% block head_title %}
    {% trans "Login" %}
{% endblock head_title %}
{% block content %}
    <h1>Login</h1>
    <p>
        If you have not created an account yet, then please
    <a href="{% url 'account_signup' %}?next={% url 'profile-onboarding' %}">sign up</a> first.
    </p>
    {% url 'account_login' as login_url %}
    {% element form form=form method="post" action=login_url tags="entrance,login" %}
        {% slot body %}
            {% csrf_token %}
            {% element fields form=form unlabeled=True %}
            {% endelement %}
            {% if redirect_field_value %}
                <input type="hidden"
                       name="{{ redirect_field_name }}"
                       value="{{ redirect_field_value }}" />
            {% endif %}
        {% endslot %}
        {% slot actions %}
            {% element button type="submit" tags="prominent,login" %}
                {% trans "Sign In" %}
            {% endelement %}
        {% endslot %}
    {% endelement %}
    {% if SOCIALACCOUNT_ENABLED %}
        {% include "socialaccount/snippets/login.html" with page_layout="entrance" %}
    {% endif %}
{% endblock content %}
